Changing the Playback State

The following examples show how to use the pause4O6CJ1, resumeOCOAV, stopUDLWOB, and seekUDLHE_ commands.

// Assume the file was opened with the alias 'movie'.

 

// Pause play.

mciSendString("pause movie", NULL, 0, NULL);

 

// Resume play.

mciSendString("resume movie", NULL, 0, NULL);

 

// Stop play.

mciSendString("stop movie", NULL, 0, NULL);

 

// Seek to the beginning.

mciSendString("seek movie to start", NULL, 0, NULL);

 

The following example shows how to change the seek mode:

// Set seek mode with the string interface.

// Assume the file was opened with the alias 'movie'.

 

void SetSeekMode(BOOL fExact)

    if (fExact)

        mciSendString("set movie seek exactly on", NULL, 0, NULL);

    else

        mciSendString("set movie seek exactly off", NULL, 0, NULL);

}